/**
 * 
 */
package name.yzhu.httpserver.method;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import name.yzhu.common.conf.IConfigurable;
import name.yzhu.common.conf.IConfigure;

/**
 * 
 * @author yhzhu
 *
 */
public abstract class AbstractHttpHandler implements IHttpHandler, IConfigurable {

	protected HttpServletRequest req = null;
	protected HttpServletResponse res = null;
	protected IConfigure conf = null;

	/* (non-Javadoc)
	 * @see name.yzhu.httpserver.method.IHttpHandler#version()
	 */
	@Override
	public int version() {
		return 0;
	}

	/* (non-Javadoc)
	 * @see name.yzhu.httpserver.method.IHttpHandler#setReqResp(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
	 */
	@Override
	public void setReqResp(HttpServletRequest req, HttpServletResponse res) {
		this.req = req;
		this.res = res;
	}

	public HttpServletRequest getReq() {
		return req;
	}

	public HttpServletResponse getRes() {
		return res;
	}

	@Override
	public void setConfig(IConfigure conf) {
		this.conf   = conf;
	}

	@Override
	public IConfigure getConfig() {
		return conf;
	}
}
